#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <Gal.h>

/// <summary>
/// The FPDCreateContext function
/// creates a kernel-mode device context.
/// </summary>
ContextPtr FPDCreateContext(void)
{
	ContextPtr ctx;
	if (!(ctx = (ContextPtr)malloc(sizeof(Context))))
		return NULL;

	ctx->left = 0;
	ctx->top = 0;
	ctx->right = 0;
	ctx->bottom = 0;
	ctx->comp_mode = 0;
	ctx->line_width = 1.0f;
	GalMatrixIdentity(&ctx->projection);

	return ctx;
}
